package com.supplychainapi.domain;

import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;
import java.util.Map;
@ApiModel("自动编码model")
public class AutoCode {

    @ApiModelProperty("自动编码 code")
    String code;

    @ApiModelProperty("进项")
    Map<String,List<Rate>> inputTaxRate= Maps.newHashMap();

    @ApiModelProperty("销项")
    Map<String,List<Rate>> salesTaxRate= Maps.newHashMap();

    @ApiModelProperty("计价方法")
    Map<String,List<Rate>> pricingMethod= Maps.newHashMap();

    @ApiModelProperty("是否自动编码0不是1是")
    String automaticStatus;



    public String getAutomaticStatus() {
        return automaticStatus;
    }

    public void setAutomaticStatus(String automaticStatus) {
        this.automaticStatus = automaticStatus;
    }


    public AutoCode() {


    }


    public AutoCode(String code, String automaticStatus) {
        this.code = code;
        this.automaticStatus = automaticStatus;
        List<Rate> inputTaxRate= Lists.newArrayList();
        List<Rate> salesTaxRate=Lists.newArrayList();
        List<Rate> pricingMethod=Lists.newArrayList();
        inputTaxRate.add(new Rate("0","0"));
        inputTaxRate.add(new Rate("3","3"));
        inputTaxRate.add(new Rate("6","6"));
        inputTaxRate.add(new Rate("11","11"));
        inputTaxRate.add(new Rate("13","13"));
        inputTaxRate.add(new Rate("17","17"));

        salesTaxRate.add(new Rate("0","0"));
        salesTaxRate.add(new Rate("3","3"));
        salesTaxRate.add(new Rate("6","6"));
        salesTaxRate.add(new Rate("11","11"));
        salesTaxRate.add(new Rate("13","13"));
        salesTaxRate.add(new Rate("17","17"));

        pricingMethod.add(new Rate("1","移动平均法"));
        pricingMethod.add(new Rate("2","先进先出法"));
        this.inputTaxRate.put("inputTaxRate",inputTaxRate);
        this.salesTaxRate.put("salesTaxRate",salesTaxRate);
        this.pricingMethod.put("pricingMethod",pricingMethod);
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }


}
